home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / gnome-vfs-2.0 / libgnomevfs / gnome-vfs-mime-handlers.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-05-01  |  5.4 KB  |  117 lines

  1. /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
  2.  
  3. /* gnome-vfs-mime-handlers.h - Mime type handlers for the GNOME Virtual
  4.    File System.
  5.  
  6.    Copyright (C) 2000 Eazel, Inc.
  7.  
  8.    The Gnome Library is free software; you can redistribute it and/or
  9.    modify it under the terms of the GNU Library General Public License as
  10.    published by the Free Software Foundation; either version 2 of the
  11.    License, or (at your option) any later version.
  12.  
  13.    The Gnome Library is distributed in the hope that it will be useful,
  14.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.     See the GNU
  16.    Library General Public License for more details.
  17.  
  18.    You should have received a copy of the GNU Library General Public
  19.    License along with the Gnome Library; see the file COPYING.LIB.  If not,
  20.    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  21.    Boston, MA 02111-1307, USA.
  22.  
  23.    Author: Maciej Stachowiak <mjs@eazel.com> */
  24.  
  25. #ifndef GNOME_VFS_MIME_HANDLERS_H
  26. #define GNOME_VFS_MIME_HANDLERS_H
  27.  
  28. #include <libgnomevfs/gnome-vfs-result.h>
  29. #include <bonobo-activation/bonobo-activation-server-info.h>
  30. #include <libgnomevfs/gnome-vfs-mime-utils.h>
  31. #include <libgnomevfs/gnome-vfs-uri.h>
  32.  
  33. G_BEGIN_DECLS
  34.  
  35. typedef enum {
  36.     GNOME_VFS_MIME_APPLICATION_ARGUMENT_TYPE_URIS,
  37.     GNOME_VFS_MIME_APPLICATION_ARGUMENT_TYPE_PATHS,
  38.     GNOME_VFS_MIME_APPLICATION_ARGUMENT_TYPE_URIS_FOR_NON_FILES
  39. } GnomeVFSMimeApplicationArgumentType;
  40.  
  41. typedef struct _GnomeVFSMimeApplicationPrivate GnomeVFSMimeApplicationPrivate;
  42.  
  43. typedef struct {
  44.     char *id; /* PRIVATE */
  45.     char *name;
  46. #ifndef GNOME_VFS_DISABLE_DEPRECATED
  47.     char *command;
  48.     gboolean can_open_multiple_files;
  49.     GnomeVFSMimeApplicationArgumentType expects_uris;
  50.     GList *supported_uri_schemes;
  51. #else
  52.     char *_command;
  53.     gboolean _can_open_multiple_files;
  54.     GnomeVFSMimeApplicationArgumentType _expects_uris;
  55.     GList *_supported_uri_schemes;
  56. #endif
  57.     gboolean requires_terminal;
  58.  
  59.     /* Padded to avoid future breaks in ABI compatibility */
  60.     void *reserved1;
  61.  
  62.     GnomeVFSMimeApplicationPrivate *priv;
  63. } GnomeVFSMimeApplication;
  64.  
  65. /* Database */
  66.  
  67. GnomeVFSMimeApplication *gnome_vfs_mime_get_default_application                   (const char              *mime_type);
  68. GnomeVFSMimeApplication *gnome_vfs_mime_get_default_application_for_uri           (const char           *uri,
  69.                                                const char              *mime_type);
  70. GList *                  gnome_vfs_mime_get_all_applications                      (const char              *mime_type);
  71. GList *             gnome_vfs_mime_get_all_applications_for_uri              (const char              *uri,
  72.                                                const char              *mime_type);
  73. Bonobo_ServerInfo *      gnome_vfs_mime_get_default_component                     (const char              *mime_type);
  74. GList *                  gnome_vfs_mime_get_all_components                        (const char              *mime_type);
  75.  
  76. /* MIME types */
  77.  
  78. const char             *gnome_vfs_mime_get_description                     (const char              *mime_type);
  79. gboolean              gnome_vfs_mime_can_be_executable                     (const char              *mime_type);
  80.  
  81. /* Application */
  82.  
  83. GnomeVFSMimeApplication *gnome_vfs_mime_application_new_from_desktop_id           (const char              *id);
  84. GnomeVFSResult           gnome_vfs_mime_application_launch                        (GnomeVFSMimeApplication *app,
  85.                                                GList                   *uris);
  86. GnomeVFSResult           gnome_vfs_mime_application_launch_with_env              (GnomeVFSMimeApplication *app,
  87.                                                GList                   *uris,
  88.                                                char                   **envp);
  89. const char        *gnome_vfs_mime_application_get_desktop_id              (GnomeVFSMimeApplication *app);
  90. const char        *gnome_vfs_mime_application_get_desktop_file_path         (GnomeVFSMimeApplication *app);
  91. const char        *gnome_vfs_mime_application_get_name                      (GnomeVFSMimeApplication *app);
  92. const char              *gnome_vfs_mime_application_get_generic_name              (GnomeVFSMimeApplication *app);
  93. const char              *gnome_vfs_mime_application_get_icon                      (GnomeVFSMimeApplication *app);
  94. const char        *gnome_vfs_mime_application_get_exec                  (GnomeVFSMimeApplication *app);
  95. const char        *gnome_vfs_mime_application_get_binary_name              (GnomeVFSMimeApplication *app);
  96. gboolean         gnome_vfs_mime_application_supports_uris              (GnomeVFSMimeApplication *app);
  97. gboolean         gnome_vfs_mime_application_requires_terminal             (GnomeVFSMimeApplication *app);
  98. gboolean         gnome_vfs_mime_application_supports_startup_notification (GnomeVFSMimeApplication *app);
  99. const char        *gnome_vfs_mime_application_get_startup_wm_class          (GnomeVFSMimeApplication *app);
  100. GnomeVFSMimeApplication *gnome_vfs_mime_application_copy                          (GnomeVFSMimeApplication *app);
  101. gboolean         gnome_vfs_mime_application_equal                  (GnomeVFSMimeApplication *app_a,
  102.                                                GnomeVFSMimeApplication *app_b);
  103. void                     gnome_vfs_mime_application_free                          (GnomeVFSMimeApplication *app);
  104.  
  105. /* Lists */
  106.  
  107. void                     gnome_vfs_mime_application_list_free                     (GList                   *list);
  108. void                     gnome_vfs_mime_component_list_free                       (GList                   *list);
  109.  
  110. G_END_DECLS
  111.  
  112. #ifndef GNOME_VFS_DISABLE_DEPRECATED
  113. #include <libgnomevfs/gnome-vfs-mime-deprecated.h>
  114. #endif
  115.  
  116. #endif /* GNOME_VFS_MIME_HANDLERS_H */
  117.